Type GUI_v0_MainFactory Extends GUI_MainFactory

	Const DEFAULT_V0_COMPONENTS:String = "test, runtimePopup"

	Method CreateMain:GUI_Main(name:String)
		Local n:String = name.ToLower()
		Select n
			Case "v0"
				Local m:GUI_v0_Main = New GUI_v0_Main
				' load components...
				Local obStr:String = Configuration.GetInstance().Get("GUI.v0.Components", DEFAULT_V0_COMPONENTS)
				Local s:Int = 0
				Local e:Int = 0
				Local c:GUI_v0_MainComponent_Abstract
				While e < obStr.length
					If Chr(obStr[e]) = "," Then
						c = GUI_v0_MainComponentFactory.Fetch(obStr[s..e].Trim())
						If c Then
							m.AddComponent(c)
						End If
						s=e + 1
					End If
					e:+1
				End While
				c = GUI_v0_MainComponentFactory.Fetch(obStr[s..e].Trim())
				If c Then
					m.AddComponent(c)
				End If
				Return m
			Default
				Return Null
		End Select
	End Method

End Type

New GUI_v0_MainFactory
